package com.yike.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.yike.common.api.Update;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 设备表
 *
 * @author yike
 * @since 2024-07-19
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("qy_machine")
@ApiModel(value = "Machine对象")
public class Machine extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("代理商ID")
    private Long agentId;

    @ApiModelProperty("店铺ID")
    private Long shopId;

    @ApiModelProperty("名称")
    private String name;

    @NotBlank(message = "设备号不能为空")
    @ApiModelProperty("设备号")
    private String macNo;

    @ApiModelProperty("序列号")
    private String macSn;

    @ApiModelProperty("型号")
    private String model;

    @ApiModelProperty("类型")
    private String type;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("绑定时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date bindTime;

    @ApiModelProperty("状态：1启用 2禁用")
    private Integer status;

    @ApiModelProperty("在线状态：1在线 2离线")
    private Integer lineStatus;

}
